package com.csun.cmny.provider.service;

import com.csun.cmny.provider.model.domain.OmcExpenseItem;
import com.csun.cmny.provider.model.domain.OmcExpenseType;
import com.csun.cmny.provider.model.domain.OmcExpenseTypeModelCode;
import com.csun.cmny.provider.service.hystrix.OmcExpenseFeignHystrix;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-12-10 19:29
 * @Description:
 */
@FeignClient(value = "cmny-provider-omc", configuration = OAuth2FeignAutoConfiguration.class, fallback = OmcExpenseFeignHystrix.class)
public interface OmcExpenseFeignApi {

    @PostMapping(value = "/api/expense/saveOmcExpenseType")
    Wrapper<Long> saveOmcExpenseType(@RequestBody OmcExpenseType omcExpenseType);

    @PostMapping(value = "/api/expense/saveOmcExpenseTypeModelCode")
    Wrapper<Long> saveOmcExpenseTypeModelCode(@RequestBody OmcExpenseTypeModelCode omcExpenseTypeModelCode);

    @PostMapping(value = "/api/expense/saveOmcExpenseItem")
    Wrapper<Long> saveOmcExpenseItem(@RequestBody OmcExpenseItem omcExpenseItem);
}
